﻿var baseURL_model = "http://192.168.100.229:8100/"; //模型
var baseURL_vector = "http://192.168.100.229:8100/"; //矢量
//影像
var baseURL_img = "http://192.168.100.229:8080/geoserver/gwc/service/wmts?service=WMTS&version=1.0.0&request=GetTile&style=raster&tilerow={TileRow}&tilecol={TileCol}&format=image/png";
//地形
var baseURL_terrain = "http://192.168.100.229:8100/";
//图层类型
var ItemTitleList = [
    {
        "name": "模型数据", //图层类型名称
        "arrowClassName": "arrow", //伸缩图标样式
        "checkClassName": "checkicon", //勾选框样式
        "NodeClassName": "layer-item active", //图层样式
        "ChildClassName": "layer-item-title", // 图层标题样式
        "iconClassName": "typeicon iconmodel", //图层图标
        "conetnClassName": "layer-item-content", //图层内容样式
        "nodeName": "model-node", //图层标识属性名
        "nodeValue": "oblique", //图层标识属性信息
        "guid": "1"//图层类型编码
    },
    {
        "name": "矢量数据",
        "arrowClassName": "arrow",
        "checkClassName": "checkicon",
        "NodeClassName": "layer-item active",
        "ChildClassName": "layer-item-title",
        "iconClassName": "typeicon iconmodel",
        "conetnClassName": "layer-item-content",
        "nodeName": "shp-node",
        "nodeValue": "shp",
        "guid": "2"
    },
    {
        "name": "影像数据",
        "arrowClassName": "arrow",
        "checkClassName": "checkicon",
        "NodeClassName": "layer-item active",
        "ChildClassName": "layer-item-title",
        "iconClassName": "typeicon iconyingxiang",
        "conetnClassName": "layer-item-content",
        "nodeName": "lrp-node",
        "nodeValue": "lrp",
        "guid": "3"
    },
    {
        "name": "地形数据",
        "arrowClassName": "arrow",
        "checkClassName": "checkicon",
        "NodeClassName": "layer-item active",
        "ChildClassName": "layer-item-title",
        "iconClassName": "typeicon icondixing",
        "conetnClassName": "layer-item-content",
        "nodeName": "terrain-node",
        "nodeValue": "stk",
        "guid": "4"
    }
    ];
//图层信息
var itemNodeList = {
    //模型
    "1": [
        {
            "name": "屯昌倾斜模型", //图层名称
            "arrowClassName": "", //图层伸缩标识样式
            "checkClassName": "checkicon", //图层勾选框样式
            "ClassName": "layer-item-title", //图层内容样式
            "iconClassName": "typeicon iconlocal", //图层标识样式
            "nodeName": "model-guid", //图层标识属性
            "nodeValue": "3dTiles-bak", //图层对应服务名
            "url": "", //图层具体地址，地址为空则当前图层加载为baseURL_model+nodeValue
            "position": "",//图层定位信息:lon,lat,height
            "servicetype":"3dTiles"
        },
        {
            "name": "江东新区模型",
            "arrowClassName": "",
            "checkClassName": "checkicon",
            "ClassName": "layer-item-title",
            "iconClassName": "typeicon iconlocal",
            "nodeName": "model-guid",
            "nodeValue": "3dTiles-bak",
            "url": "",
            "position": "",
            "servicetype": "3dTiles"
        }
        ],
    //矢量
    "2": [
        {
            "name": "天地图路网",
            "arrowClassName": "",
            "checkClassName": "checkicon",
            "ClassName": "layer-item-title",
            "iconClassName": "typeicon iconpolygon",
            "nodeName": "shp-id",
            "nodeValue": "tdlyxz2016",
            "url": "",
            "position": "",
            "servicetype": "3dTiles"
        },
        {
            "name": "江东新区权属",
            "arrowClassName": "",
            "checkClassName": "checkicon",
            "ClassName": "layer-item-title",
            "iconClassName": "typeicon iconpolygon",
            "nodeName": "shp-id",
            "nodeValue": "hdqs",
            "url": "",
            "position": "",
            "servicetype": "3dTiles"
        },
        {
            "name": "江东新区多规合一",
            "arrowClassName": "",
            "checkClassName": "checkicon",
            "ClassName": "layer-item-title",
            "iconClassName": "typeicon iconpolygon",
            "nodeName": "shp-id",
            "nodeValue": "hddghy",
            "url": "",
            "position": "",
            "servicetype": "3dTiles"
        }
        ],
    //影像
    "3": [
        {
            "name": "江东新区2016",
            "arrowClassName": "",
            "checkClassName": "checkicon",
            "ClassName": "layer-item-title",
            "iconClassName": "typeicon iconlocal",
            "nodeName": "lrp-id",
            "nodeValue": "test:haikouDOM",
            "url": "",
            "position": "",
            "servicetype": "3dTiles"
        },
        {
            "name": "江东新区2018",
            "arrowClassName": "",
            "checkClassName": "checkicon",
            "ClassName": "layer-item-title",
            "iconClassName": "typeicon iconlocal",
            "nodeName": "lrp-id",
            "nodeValue": "test:hk2018",
            "url": "",
            "position": "",
            "servicetype": "3dTiles"
        },
        {
            "name": "屯昌",
            "arrowClassName": "",
            "checkClassName": "checkicon",
            "ClassName": "layer-item-title",
            "iconClassName": "typeicon iconlocal",
            "nodeName": "lrp-id",
            "nodeValue": "test:tcdom",
            "url": "",
            "position": "",
            "servicetype": "3dTiles"
        },
        {
            "name": "会文",
            "arrowClassName": "",
            "checkClassName": "checkicon",
            "ClassName": "layer-item-title",
            "iconClassName": "typeicon iconlocal",
            "nodeName": "lrp-id",
            "nodeValue": "test:huiwenDOM",
            "url": "",
            "position": "",
            "servicetype": "3dTiles"
        },
        {
            "name": "保亭",
            "arrowClassName": "",
            "checkClassName": "checkicon",
            "ClassName": "layer-item-title",
            "iconClassName": "typeicon iconlocal",
            "nodeName": "lrp-id",
            "nodeValue": "test:baotingDOM",
            "url": "",
            "position": "",
            "servicetype": "3dTiles"
        }
        ],
    //地形
    "4": [
        {
            "name": "文昌地形",
            "arrowClassName": "",
            "checkClassName": "checkicon",
            "ClassName": "layer-item-title",
            "iconClassName": "typeicon iconlocal",
            "nodeName": "terrain-id",
            "nodeValue": "terrain_tiles_wl",
            "url": "",
            "position": "110.89,19.937,1000",
            "servicetype": "3dTiles"
        },
        {
            "name": "屯昌地形",
            "arrowClassName": "",
            "checkClassName": "checkicon",
            "ClassName": "layer-item-title",
            "iconClassName": "typeicon iconlocal",
            "nodeName": "terrain-id",
            "nodeValue": "terrain_tiles_tc_16",
            "url": "",
            "position": "",
            "servicetype": "3dTiles"
        },
        {
            "name": "海南地形",
            "arrowClassName": "",
            "checkClassName": "checkicon",
            "ClassName": "layer-item-title",
            "iconClassName": "typeicon iconlocal",
            "nodeName": "terrain-id",
            "nodeValue": "stk",
            "url": "",
            "position": "",
            "servicetype": "3dTiles"
        }
        ]
};
//fly
var base_flyLine = [
    { "name": "路线1", "id": "1",
        "coordinates": [[101.80089882736969, 26.60700234866561],
    [101.80012205161088, 26.607156056057718],
    [101.79914635458855, 26.607311680194293],
    [101.78859855581545, 26.607627935635858],
    [101.7776561201824, 26.607949639796374],
    [101.76541966619148, 26.608275395155456],
    [101.75438981760831, 26.608603700646363],
    [101.74326701452125, 26.608933431023935],
    [101.7321517077233, 26.609263375108224],
     [101.72109698643999, 26.609428083407604],
     [101.7021442786367, 26.609592440630433]]
    },
    { "name": "路线2", "id": "2",
        "coordinates": [[101.77632517022289, 27.017483951603108],
    [101.69648944076688, 27.017739688192236],
    [101.68665656630865, 27.017990558564883],
    [101.67682661352719, 27.018236662767158],
    [101.66732145300115, 27.018944953902491],
    [101.65782034294917, 27.019669204900936],
    [101.64832407092552, 27.020410558631944],
    [101.63883361826049, 27.021170459002782]]
    },
    { "name": "路线3", "id": "3",
        "coordinates": [[101.874590274363, 27.145005929597144],
    [101.77458023283592, 27.155403363252655],
    [101.67457421885976, 27.165807066447212],
     [101.57457222932466, 27.176217212491035],
     [101.47457426240401, 27.186634071647476],
      [101.37458031930484, 27.197057900035939],
      [101.27459040426883, 27.207488996964835],
      [101.17460450264189, 27.21792707817643]]
    }
    ];